<template>
    <view>
      <scroll-view class="list-container" scroll-y="true">
        <view class="list-item" v-for="(item, index) in tabMenuList" :key="index" @click="() => {
          onTabClick(index, item)
        }">
          <view style="font-family:NotoSansSC-Medium;font-size:28rpx">{{ item.title }}</view>
          <button v-if="index==0" class='kf' open-type="contact"><text class='text-grey'>客服按钮</text></button>
          <view style="width: 64rpx;height: 64rpx;"> <img
              src="https://100000063-1252208446.file.myqcloud.com/images/right1.png" alt=""
              style="width: 64rpx;height: 64rpx;vertical-align: middle;"></view>
        </view>
      </scroll-view>
      <view class="img-container" @click="gotowx">
        <img src="https://100000063-1252208446.file.myqcloud.com/images/3xgzh11.png"
          style="width:654rpx;height: 192rpx;margin-left:48rpx" alt="">
      </view>

    </view>
  </template>

  <script>
  export default {
    data() {
      return {
        tabMenuList: [
          {
            title: '专属客服',
            path: '/pages/order/list',
            authorizationRequired: true,
            iconFt: 'mcl-gerenxinxi',
            index: 3,
            hasChild: false,
          },

          {
            title: '规章/营业资质',
            path: '/pages/customer/settings',
            authorizationRequired: true,
            iconFt: 'mcl-xuzhi',
            index: 5,
            hasChild: false,
          },
        ],
      }
    },

    mounted() {},
    methods: {
      onTabClick(index, item) {
        if(index === 0){
          this.$commonSensors.commonPageClick('MemberPageClick', '专属客服')
        }else{
          this.$commonSensors.commonPageClick('MemberPageClick', '规章/营业资质')
          uni.navigateTo({ url: item.path })
        }
      },
      gotowx(){
        uni.navigateTo({
          url: '/pages/public-account/public-account',
        })
      }

    },
  }
  </script>

  <style scoped>
  .list-container {
    width: 654rpx;
    height: 100%;
    margin-left: 48rpx;
  }

  .list-item {
    position: relative;
    height: 160rpx;
    line-height: 160rpx;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 400;
    font-size: 28rpx;
    padding-left: 24rpx;
  }

  .img-container {
    width: 750rpx;
    height: 288rpx;
    padding: 48rpx 0rpx 0rpx 0rpx;
  }
  .kf{
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0 !important;
  }
  </style>
